﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddOnlineGame.aspx.cs" Inherits="Admin_Default2" %>

<%@ Register Assembly="ASPNetFlash.NET3" Namespace="ASPNetFlash" TagPrefix="ASPNetFlash" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="top-bar select-bar">
        <h1>
            <b>Add Flash Game </b>
        </h1>
        <asp:Label ID="lblmsg" Font-Bold="true" Width="100%" runat="server" BackColor="Red"
            ForeColor="White" EnableTheming="False"></asp:Label>
    </div>
    <br />
    <div>
        <table width="150%" cellpadding="3px">
            <tr>
                <td>
                    <asp:Label ID="lblSubCategory" Font-Bold="true" runat="server" Text="Select Game Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlSubCategory" runat="server" Width="80%" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlSubCategory_SelectedIndexChanged">
                        <asp:ListItem Text="------Select Game Category------" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Label ID="lblGameName" Font-Bold="true" runat="server" Text="Game Name: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtGameName" runat="server" Width="80%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblOwner" Font-Bold="true" runat="server" Text="Owner: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtOwner" runat="server" Width="80%"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblGameCover" Font-Bold="true" runat="server" Text="Game Cover: "></asp:Label>
                </td>
                <td>
                    <asp:FileUpload ID="FileUploadGameCover" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblFlashGame" Font-Bold="true" runat="server" Text="Game Path: "></asp:Label>
                </td>
                <td colspan="3">
                    <asp:FileUpload ID="FileUploadFlashGame" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblGameDescription" Font-Bold="true" runat="server" Text="Game Description: "></asp:Label>
                </td>
                <td colspan="3">
                    <FCKeditorV2:FCKeditor ID="FCKeditorGameDescription" runat="server" BasePath="~/fckeditor/"
                        Width="100%">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="4">
                    <asp:Button ID="btnAddGame" Width="15%" Font-Bold="true" OnClientClick="return ValidateAddOnlineGame('ddlSubCategory','txtGameName','FCKeditorGameDescription','txtOwner','FileUploadGameCover')"
                        Text="Add" runat="server" onclick="btnAddGame_Click" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div class="table">
        <asp:GridView ID="grdGame" runat="server" Width="100%" AutoGenerateColumns="false" ShowHeader="true">
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblGameID" Text='<%# DataBinder.Eval(Container.DataItem,"GameID")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Cover">
                    <ItemTemplate>
                        <asp:Image ID="imgGameCover" Width="150px" Height="100px" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"GameCover")%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblName" Text='<%# DataBinder.Eval(Container.DataItem,"GameName")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Path">
                    <ItemTemplate>
                        <asp:Label ID="lblPath" Text='<%# DataBinder.Eval(Container.DataItem,"GamePath")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Owner">
                    <ItemTemplate>
                        <asp:Label ID="lblOwner" Text='<%# DataBinder.Eval(Container.DataItem,"GameOwner")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" EditImageUrl="~/Admin/img/edit-icon.gif"
                    ButtonType="Image" />
            </Columns>
            <AlternatingRowStyle BackColor="ButtonShadow" />
            <HeaderStyle BackColor="SpringGreen" />
        </asp:GridView>
       
    </div>
</asp:Content>
